# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gst-libav
pkgver=1.16.2
pkgrel=2
pkgdesc="GStreamer streaming media framework libav plugin"
url="https://gstreamer.freedesktop.org"
arch="all"
license="GPL-2.0-or-later LGPL-2.0-or-later"
makedepends="coreutils ffmpeg-dev gst-plugins-base-dev gstreamer-dev meson
	orc-dev"
source="https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-$pkgver.tar.xz"
replaces="gst-libav1"

build() {
	export CFLAGS="$CFLAGS -fno-strict-aliasing -D_XOPEN_SOURCE"
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		-Dpackage-origin="https://alpinelinux.org" \
		-Dpackage-name="GStreamer libav plugin (Alpine Linux)" \
		. output
	ninja -C output
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

doc() {
	default_doc
	replaces="${pkgname}1-doc"
}

sha512sums="10817dec823b8ca84372d16e36c4ee11ab7a96a9168418f4c0bd0909fbda0ff45426bd3f754d7d491d4b07a51ec7eaa8e065e7e5c1daa120828c35a68adb312d  gst-libav-1.16.2.tar.xz"
